package interpreter


type tChars struct {

}


func newCharsLib() *tChars {
	return &tChars{}
}

func (me *tChars) IsSpace(it rune) bool {
	switch it {
	case ' ':
		return true
	case '\t':
		return true
	case '\r':
		return true
	case '\n':
		return true
	}

	return false
}


func (me *tChars) Is09(it rune) bool {
	return it >= '0' && it <= '9'
}

func (me *tChars) Is19(it rune) bool {
	return it >= '1' && it <= '9'
}

func (me *tChars) IsLetter(it rune) bool {
	return (it >= 'a' && it <= 'z') || (it >= 'A' && it <= 'Z')
}

func (me *tChars) IsUnderscore(it rune) bool {
	return it == '_'
}

func (me *tChars) IsLB(it rune) bool {
	return it == '('
}

func (me *tChars) IsRB(it rune) bool {
	return it == ')'
}

func (me *tChars) IsChar(it rune, args... rune) bool {
	for _,v := range args {
		if v == it {
			return true
		}
	}
	return false
}

var chars = newCharsLib()